package tgc.edu.library.repository;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import tgc.edu.library.custom.CommonRepository;
import tgc.edu.library.entity.Record;


@Repository
public interface RecordRepository extends CommonRepository<Record, Integer>{

	@Transactional
	@Modifying
	@Query(value="DELETE FROM record", nativeQuery = true)
	void empty();
	
	
	Page<Record> findByDate(String date,Pageable pageable);

}
